/**
 * @Aurhor 把手给我
 * @Date 2022/6/13 16:15
 * @Version 1.0
 **/
package com.ft.service.impl;

import com.ft.dao.IndexGlaeDao;
import com.ft.domain.IndexGlae;
import com.ft.service.IndexGlaeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IndexGlaeImpl implements IndexGlaeService {

    @Autowired
    IndexGlaeDao indexGlaeDao;

    /**
     * 查询主页日用百货组件所有数据
     * @return 返回IndexSmartWear实体类集合
     */
    @Override
    public List<IndexGlae> selectAll() {
        List<IndexGlae> indexSmartWears = indexGlaeDao.selectAll();
        return indexSmartWears;
    }
    /**
     * 主页日用百货组件添加数据
     * @param  indexGlae 传入的IndexSmartWear对象
     * @return 0成功，1失败
     */
    @Override
    public int addIndexGlae(IndexGlae indexGlae) {
        int i = indexGlaeDao.addIndexGlae(indexGlae);
        return i;
    }
    /**
     * 主页日用百货组件删除功能
     * @param id 更加id删除
     * @return 0成功,1失败
     */
    @Override
    public int deleteIndexGlae(int id) {
        int i = indexGlaeDao.deleteIndexGlae(id);
        return i;
    }
}
